<%--
  Created by IntelliJ IDEA.
  User: 22719
  Date: 2025/7/28
  Time: 19:10
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
  <base href="/oa1/">
  <title>消息详情</title>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <script src="https://cdn.bootcdn.net/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
  <link href="static/bootstrap-3.3.5/css/bootstrap.css" rel="stylesheet">
  <link href="static/bootstrapvalidator/css/bootstrapValidator.css"
        rel="stylesheet">
  <style>
    /*定义类名为.thead-blue的样式*/
    .thead-blue {
      color: #fff;
      font-weight: bold;
      background-color: #337ab7;
    }
  </style>
</head>

<body>
<div class="panel panel-primary">
  <table class="table table-bordered table-hover">
    <thead>
    <tr class="thead-blue">
      <td colspan="2">短消息详情</td>
    </tr>
    </thead>
    <tbody>
    <tr>
      <td class="col-md-1"><label>消息主题</label></td>
      <td class="col-md-10">${xiaoxi.biaoti}</td>
    </tr>
    <tr>
      <td><label>发送人</label></td>
      <td>${xiaoxi.empVo.empName}</td>
    </tr>
    <tr>
      <td><label>接收人</label></td>
      <td>
        <c:forEach items="${xiaoxi.xiaoxijieshous}" var="jieshou">
          <span class="text-success">${jieshou.empVo1.empName}</span>
        </c:forEach>
      </td>
    </tr>
    <tr>
      <td><label>发送时间</label></td>
      <td>${xiaoxi.createDate}</td>
    </tr>
    <tr>
      <td><label>消息内容</label></td>
      <td>${xiaoxi.neirong}</td>
    </tr>
    <tr>
      <td><label>消息附件</label></td>
      <td><a href="msg/downloadMsgFile?oid=${xiaoxi.oid}"></a></td>
    </tr>

    <tr>
      <td colspan="6" align="center"><a type="button"
                                        href="javascript:location.href=document.referrer;" class="btn btn-info">返回</a></td>
    </tr>
    </tbody>
  </table>
</div>

<script type="text/javascript">
  $(document).ajaxError(function(event,xhr) {
    if(xhr.status=="403"){//没有权限
      document.location.href = xhr.getResponseHeader("url");
    }else if(xhr.status!="200"){
      //alert("服务器错误!");
      console.log("服务器错误!");
    }
  });
</script>
</body>
</html>
